package com.example.administrator.appli.service;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class LocalServiceCount extends Service {
    //方式1 继承 Binder
    //方式2 通过接口
    MyBinder myBinder;

    @Override
    public IBinder onBind(Intent intent) {
        myBinder = new MyBinder();
        return myBinder;

    }

    public class MyBinder extends Binder {
        public int add(int a, int b) {
            return a + b;
        }

    }

}
